Crate epd_waveshare
source ·Expand description
A simple Driver for the Waveshare E-Ink Displays via SPI
This driver was built using embedded-hal
traits.
Requirements
SPI
- MISO is not connected/available
- SPI_MODE_0 is used (CPHL = 0, CPOL = 0)
- 8 bits per word, MSB first
- Max. Speed tested by myself was 8Mhz but more should be possible (Ben Krasnow used 18Mhz with his implemenation)
Other….
- Buffersize: Wherever a buffer is used it always needs to be of the size:
width / 8 * length
, where width and length being either the full e-ink size or the partial update window size
Examples
ⓘ
use eink-waveshare-rs::epd4in2::EPD4in2;
let mut epd4in2 = EPD4in2::new(spi, cs, busy, dc, rst, delay).unwrap();
let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
// draw something into the buffer
epd4in2.display_and_transfer_buffer(buffer, None);
// wait and look at the image
epd4in2.clear_frame(None);
epd4in2.sleep();
Modules
B/W Color for EPDs
A simple Driver for the Waveshare 1.54“ E-Ink Display via SPI
A simple Driver for the Waveshare 2.9“ E-Ink Display via SPI
A simple Driver for the Waveshare 4.2“ E-Ink Display via SPI
Graphics Support for EPDs
Constants
SPI mode -
For more infos see Requirements: SPI